package org.example.entity;


import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ResponseModel<T> {

    private int code;

    private String message;

    private T data;

    public static <T> ResponseModel<T> authSuccess(T data) {
        return new ResponseModel<>(200, "authentication success", data);
    }

    public static <T> ResponseModel<T> authFailure(T data) {
        return new ResponseModel<>(401, "authentication failure", data);
    }




}
